package com.shijie.feign;

import com.shijie.feign.fallback.PoolFallback;
import com.shijie.result.SjResult;
import com.shijie.vo.JudgePoolVO;
import com.shijie.vo.PoolVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "service-pool", fallback = PoolFallback.class)
public interface PoolFeign {

    @GetMapping("/get/{poolId}")
    SjResult<PoolVO> getByPoolId(@PathVariable("poolId") Long poolId);

    @GetMapping("/judgeRequire")
    SjResult<JudgePoolVO> getJudgeRequire(@RequestParam("poolId") Long poolId);

}
